﻿// MT210




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.Collections.Generic;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category2
{
  public class MT210 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagSequenceDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagChoiceDefinition U0013;
    private static SwiftTagDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagSubItemDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagChoiceDefinition U001E;
    private static SwiftTagDefinition U001F;
    private static SwiftTagSubItemDefinition U007F;
    private static SwiftTagSubItemDefinition U0080;
    private static SwiftTagDefinition U0081;
    private static SwiftTagSubItemDefinition U0082;
    private static SwiftTagSubItemDefinition U0083;
    private static SwiftTagChoiceDefinition U0084;
    private static SwiftTagDefinition U0086;
    private static SwiftTagSubItemDefinition U0087;
    private static SwiftTagSubItemDefinition U0088;
    private static SwiftTagDefinition U0089;
    private static SwiftTagSubItemDefinition U008A;
    private static SwiftTagSubItemDefinition U008B;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Account Identification")]
    public Tag25 AccountIdentification_25
    {
      get
      {
        return new Tag25((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0004);
      }
    }

    [Description("Account Identification")]
    public Tag25 Tag25_AccountIdentification
    {
      get
      {
        return this.AccountIdentification_25;
      }
    }

    [Description("Value Date")]
    public Tag30 ValueDate_30
    {
      get
      {
        return new Tag30((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0006);
      }
    }

    [Description("Value Date")]
    public Tag30 Tag30_ValueDate
    {
      get
      {
        return this.ValueDate_30;
      }
    }

    [Description("Related Reference")]
    public MT210.SequenceClass[] Sequence
    {
      get
      {
        int index = -1;
        List<MT210.SequenceClass> list = new List<MT210.SequenceClass>();
        int count;
        do
        {
          ++index;
          MT210.SequenceClass sequenceClass = new MT210.SequenceClass((SwiftElement) this, index, false);
          count = this.ListTags((SwiftElement) sequenceClass).Count;
          if (count > 0)
            list.Add(sequenceClass);
        }
        while (count > 0);
        return list.ToArray();
      }
    }

    public MT210()
      : base(true)
    {
    }

    public MT210(SwiftMessage message)
      : base(message)
    {
    }

    public MT210.SequenceClass AddSequence()
    {
      return new MT210.SequenceClass((SwiftElement) this, this.Sequence.Length, true);
    }

    public void RemoveSequence(MT210.SequenceClass sequence)
    {
      foreach (SwiftTag tag in this.ListTags((SwiftElement) sequence))
        this.RemoveTag(tag);
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT210.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT210.MessageDefinition = new SwiftMessageDefinition("MT210", "Notice to Receive");
      MT210.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT210.U0002.TagName = ":20:";
      MT210.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT210.U0002.Elements.Add((SwiftDefinitionElement) MT210.U0003);
      MT210.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT210.U0002);
      MT210.U0004 = new SwiftTagDefinition("AccountIdentification_25", "Account Identification");
      MT210.U0004.TagName = ":25:";
      MT210.U0004.Mandatory = false;
      MT210.U0005 = new SwiftTagSubItemDefinition("Account", "Account");
      MT210.U0004.Elements.Add((SwiftDefinitionElement) MT210.U0005);
      MT210.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT210.U0004);
      MT210.U0006 = new SwiftTagDefinition("ValueDate_30", "Value Date");
      MT210.U0006.TagName = ":30:";
      MT210.U0007 = new SwiftTagSubItemDefinition("Date", "Date");
      MT210.U0006.Elements.Add((SwiftDefinitionElement) MT210.U0007);
      MT210.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT210.U0006);
      MT210.U0008 = new SwiftTagSequenceDefinition("Sequence", "Related Reference");
      MT210.U0008.Multiple = true;
      MT210.U000E = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT210.U000E.TagName = ":21:";
      MT210.U000F = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT210.U000E.Elements.Add((SwiftDefinitionElement) MT210.U000F);
      MT210.U0008.Elements.Add((SwiftDefinitionElement) MT210.U000E);
      MT210.U0010 = new SwiftTagDefinition("CurrencyCodeAmount_32B", "Currency Code, Amount");
      MT210.U0010.TagName = ":32B:";
      MT210.U0011 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT210.U0010.Elements.Add((SwiftDefinitionElement) MT210.U0011);
      MT210.U0012 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT210.U0010.Elements.Add((SwiftDefinitionElement) MT210.U0012);
      MT210.U0008.Elements.Add((SwiftDefinitionElement) MT210.U0010);
      MT210.U0013 = new SwiftTagChoiceDefinition("Choice", "");
      MT210.U0013.Mandatory = false;
      MT210.U0013.Multiple = true;
      MT210.U0014 = new SwiftTagDefinition("OrderingCustomer_50C", "Ordering Customer");
      MT210.U0014.TagName = ":50C:";
      MT210.U0013.Elements.Add((SwiftDefinitionElement) MT210.U0014);
      MT210.U0015 = new SwiftTagDefinition("OrderingCustomer_50", "Ordering Customer");
      MT210.U0015.TagName = ":50:";
      MT210.U0013.Elements.Add((SwiftDefinitionElement) MT210.U0015);
      MT210.U0016 = new SwiftTagDefinition("OrderingCustomer_50F", "Ordering Customer");
      MT210.U0016.TagName = ":50F";
      MT210.U0017 = new SwiftTagSubItemDefinition("OrderingCustomerIdentification_1", "Account");
      MT210.U0018 = new SwiftTagSubItemDefinition("Account", "");
      MT210.U0017.Elements.Add((SwiftDefinitionElement) MT210.U0018);
      MT210.U0016.Elements.Add((SwiftDefinitionElement) MT210.U0017);
      MT210.U0019 = new SwiftTagSubItemDefinition("OrderingCustomerIdentification_2", "Ordering Customer Identification");
      MT210.U001A = new SwiftTagSubItemDefinition("TypeOfIdentification", "Type Of Identification");
      MT210.U0019.Elements.Add((SwiftDefinitionElement) MT210.U001A);
      MT210.U001B = new SwiftTagSubItemDefinition("CountryCode", "Country Code");
      MT210.U0019.Elements.Add((SwiftDefinitionElement) MT210.U001B);
      MT210.U001C = new SwiftTagSubItemDefinition("Identification", "Identification");
      MT210.U0019.Elements.Add((SwiftDefinitionElement) MT210.U001C);
      MT210.U0016.Elements.Add((SwiftDefinitionElement) MT210.U0019);
      MT210.U001D = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT210.U0016.Elements.Add((SwiftDefinitionElement) MT210.U001D);
      MT210.U0013.Elements.Add((SwiftDefinitionElement) MT210.U0016);
      MT210.U0008.Elements.Add((SwiftDefinitionElement) MT210.U0013);
      MT210.U001E = new SwiftTagChoiceDefinition("Choice", "");
      MT210.U001E.Mandatory = false;
      MT210.U001E.Multiple = true;
      MT210.U001F = new SwiftTagDefinition("OrderingInstitution_52A", "Ordering Institution");
      MT210.U001F.TagName = ":52A:";
      MT210.U007F = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT210.U007F.Mandatory = false;
      MT210.U001F.Elements.Add((SwiftDefinitionElement) MT210.U007F);
      MT210.U0080 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier");
      MT210.U001F.Elements.Add((SwiftDefinitionElement) MT210.U0080);
      MT210.U001E.Elements.Add((SwiftDefinitionElement) MT210.U001F);
      MT210.U0081 = new SwiftTagDefinition("OrderingInstitution_52D", "Ordering Institution");
      MT210.U0081.TagName = ":52D:";
      MT210.U0082 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT210.U0082.Mandatory = false;
      MT210.U0081.Elements.Add((SwiftDefinitionElement) MT210.U0082);
      MT210.U0083 = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT210.U0081.Elements.Add((SwiftDefinitionElement) MT210.U0083);
      MT210.U001E.Elements.Add((SwiftDefinitionElement) MT210.U0081);
      MT210.U0008.Elements.Add((SwiftDefinitionElement) MT210.U001E);
      MT210.U0084 = new SwiftTagChoiceDefinition("Choice", "");
      MT210.U0084.Mandatory = false;
      MT210.U0084.Multiple = true;
      MT210.U0086 = new SwiftTagDefinition("Intermediary_56A", "Intermediary");
      MT210.U0086.TagName = ":56A:";
      MT210.U0087 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT210.U0087.Mandatory = false;
      MT210.U0086.Elements.Add((SwiftDefinitionElement) MT210.U0087);
      MT210.U0088 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier");
      MT210.U0086.Elements.Add((SwiftDefinitionElement) MT210.U0088);
      MT210.U0084.Elements.Add((SwiftDefinitionElement) MT210.U0086);
      MT210.U0089 = new SwiftTagDefinition("Intermediary_56D", "Intermediary");
      MT210.U0089.TagName = ":56D:";
      MT210.U008A = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT210.U008A.Mandatory = false;
      MT210.U0089.Elements.Add((SwiftDefinitionElement) MT210.U008A);
      MT210.U008B = new SwiftTagSubItemDefinition("NameAndAddress", "Name And Address");
      MT210.U0089.Elements.Add((SwiftDefinitionElement) MT210.U008B);
      MT210.U0084.Elements.Add((SwiftDefinitionElement) MT210.U0089);
      MT210.U0008.Elements.Add((SwiftDefinitionElement) MT210.U0084);
      MT210.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT210.U0008);
    }

    public class SequenceClass : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT210.U0008;
        }
      }

      [Description("Related Reference")]
      public Tag21 RelatedReference_21
      {
        get
        {
          return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U000E);
        }
      }

      [Description("Related Reference")]
      public Tag21 Tag21_RelatedReference
      {
        get
        {
          return this.RelatedReference_21;
        }
      }

      [Description("Currency Code, Amount")]
      public Tag32B CurrencyCodeAmount_32B
      {
        get
        {
          return new Tag32B((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0010);
        }
      }

      [Description("Currency Code, Amount")]
      public Tag32B Tag32B_CurrencyCodeAmount
      {
        get
        {
          return this.CurrencyCodeAmount_32B;
        }
      }

      [Description("Ordering Customer")]
      public Tag50C OrderingCustomer_50C
      {
        get
        {
          return new Tag50C((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0014);
        }
      }

      [Description("Ordering Customer")]
      public Tag50C Tag50C_OrderingCustomer
      {
        get
        {
          return this.OrderingCustomer_50C;
        }
      }

      [Description("Ordering Customer")]
      public Tag50 OrderingCustomer_50
      {
        get
        {
          return new Tag50((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0015);
        }
      }

      [Description("Ordering Customer")]
      public Tag50 Tag50_OrderingCustomer
      {
        get
        {
          return this.OrderingCustomer_50;
        }
      }

      [Description("Ordering Customer")]
      public Tag50F OrderingCustomer_50F
      {
        get
        {
          return new Tag50F((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0016);
        }
      }

      [Description("Ordering Customer")]
      public Tag50F Tag50F_OrderingCustomer
      {
        get
        {
          return this.OrderingCustomer_50F;
        }
      }

      [Description("Ordering Institution")]
      public Tag52A OrderingInstitution_52A
      {
        get
        {
          return new Tag52A((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U001F);
        }
      }

      [Description("Ordering Institution")]
      public Tag52A Tag52A_OrderingInstitution
      {
        get
        {
          return this.OrderingInstitution_52A;
        }
      }

      [Description("Ordering Institution")]
      public MT210.SequenceClass.Tag52D OrderingInstitution_52D
      {
        get
        {
          return new MT210.SequenceClass.Tag52D((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0081);
        }
      }

      [Description("Ordering Institution")]
      public MT210.SequenceClass.Tag52D Tag52D_OrderingInstitution
      {
        get
        {
          return this.OrderingInstitution_52D;
        }
      }

      [Description("Intermediary")]
      public Tag56A Intermediary_56A
      {
        get
        {
          return new Tag56A((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0086);
        }
      }

      [Description("Intermediary")]
      public Tag56A Tag56A_Intermediary
      {
        get
        {
          return this.Intermediary_56A;
        }
      }

      [Description("Intermediary")]
      public Tag56D Intermediary_56D
      {
        get
        {
          return new Tag56D((SwiftElement) this, 0, (SwiftDefinitionElement) MT210.U0089);
        }
      }

      [Description("Intermediary")]
      public Tag56D Tag56D_Intermediary
      {
        get
        {
          return this.Intermediary_56D;
        }
      }

      internal SequenceClass(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public class Tag52D : SwiftTagWrapper
      {
        public string Value
        {
          get
          {
            return this.GetValue();
          }
          set
          {
            this.SetValue("52D", value);
          }
        }

        internal Tag52D(SwiftElement parent, int index, SwiftDefinitionElement definition)
          : base(parent, index, definition)
        {
        }
      }
    }
  }
}
